import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';

import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
import {NgxEchartsModule} from "ngx-echarts";
import {NZ_I18N, zh_CN} from 'ng-zorro-antd/i18n';
import {HashLocationStrategy, LocationStrategy, NgOptimizedImage, registerLocaleData} from '@angular/common';
import zh from '@angular/common/locales/zh';
import {FormsModule} from '@angular/forms';
import {HttpClientModule} from '@angular/common/http';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {IconsProviderModule} from './icons-provider.module';
import {NzLayoutModule} from 'ng-zorro-antd/layout';
import {NzMenuModule} from 'ng-zorro-antd/menu';
import {DashComponent} from './pages/dash/dash.component';
import {HomeComponent} from './pages/home/home.component';
import {NzImageService} from "ng-zorro-antd/image";
import {CommonService} from "./service/base/common.service";
import {NzModalModule, NzModalService} from "ng-zorro-antd/modal";
import {NzMessageModule} from "ng-zorro-antd/message";
import {NzSwitchModule} from "ng-zorro-antd/switch";
import {NzTabsModule} from "ng-zorro-antd/tabs";
import {NzTableModule} from "ng-zorro-antd/table";
import {NzDividerModule} from "ng-zorro-antd/divider";
import {AdminComponent} from './pages/admin/admin.component';
import {NzInputModule} from 'ng-zorro-antd/input';
import {NzButtonModule} from 'ng-zorro-antd/button';
import {NzFormModule} from 'ng-zorro-antd/form';
import {NzRadioModule} from 'ng-zorro-antd/radio';
import {AdminDetailComponent} from './dialog/admin-detail/admin-detail.component';
import {NzCheckboxModule} from 'ng-zorro-antd/checkbox';
import {OrderComponent} from './pages/order/order.component';
import {NzSelectModule} from "ng-zorro-antd/select";
import {UserComponent} from './pages/user/user.component';
import {UserDetailComponent} from './dialog/user-detail/user-detail.component';
import {NzDatePickerModule} from "ng-zorro-antd/date-picker";
import {UserCpsComponent} from './pages/user-cps/user-cps.component';
import {ProductComponent} from './pages/product/product.component';
import {ProductStockComponent} from './dialog/product-stock/product-stock.component';
import {ActReportComponent} from './pages/act-report/act-report.component';

registerLocaleData(zh);

@NgModule({
  declarations: [
    AppComponent,
    DashComponent,
    HomeComponent,
    AdminComponent,
    AdminDetailComponent,
    OrderComponent,
    UserComponent,
    UserDetailComponent,
    UserCpsComponent,
    ProductComponent,
    ProductStockComponent,
    ActReportComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    NgxEchartsModule.forRoot({
      echarts: () => import('echarts')
    }),
    FormsModule,
    HttpClientModule,
    BrowserAnimationsModule,
    IconsProviderModule,
    NzLayoutModule,
    NzMenuModule,
    NzMessageModule,
    NgOptimizedImage,
    NzSwitchModule,
    NzTabsModule,
    NzTableModule,
    NzDividerModule,
    NzInputModule,
    NzButtonModule,
    NzModalModule,
    NzFormModule,
    NzRadioModule,
    NzCheckboxModule,
    NzSelectModule,
    NzDatePickerModule
  ],
  providers: [
    {provide: NZ_I18N, useValue: zh_CN}, {
      provide: LocationStrategy,
      useClass: HashLocationStrategy
    }, NzImageService,
    CommonService,
    NzModalService
  ],
  bootstrap: [AppComponent]
})
export class AppModule {
}
